package com.engine.core.interceptor;

import com.engine.core.gen.Global;
import com.engine.core.gen.PagedOption;
import com.engine.dialect.DialectType;
import org.springframework.context.ApplicationContext;
import org.springframework.jdbc.core.JdbcTemplate;

public class JdbcCommandContext extends CommandContext {
    protected JdbcTemplate jdbcTemplate;


    protected ApplicationContext applicationContext;

    protected DialectType dialectType;

    protected PagedOption pagedOption=new PagedOption();

    public JdbcCommandContext(Global global, JdbcTemplate jdbcTemplate,DialectType dialectType) {
        super(global);
        this.jdbcTemplate = jdbcTemplate;
        this.dialectType = dialectType;
    }


    public JdbcCommandContext(Global global, JdbcTemplate jdbcTemplate, ApplicationContext applicationContext,DialectType dialectType) {
        super(global);
        this.jdbcTemplate = jdbcTemplate;
        this.applicationContext = applicationContext;
        this.dialectType = dialectType;
    }

    public JdbcTemplate getJdbcTemplate() {
        return jdbcTemplate;
    }

    public PagedOption getPagedOption() {
        return pagedOption;
    }

    public ApplicationContext getApplicationContext() {
        return applicationContext;
    }

    public DialectType getDialectType() {
        return dialectType;
    }
}
